import request from '@/utils/request'
import qs from 'qs'

export function list(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_goods/index',
    method: 'get',
    params: data
  })
}

export function deleteAll(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_goods/del',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function productSort(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_goods/sorts',
    method: 'post',
    data: qs.stringify(data)
  })
}

export function add(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_goods/add',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function classifyTag(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_cate/cate',
    method: 'get',
    params: data
  })
}
export function classifyList(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_cate/index',
    method: 'get',
    params: data
  })
}
export function classifydelete(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_cate/del',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function productEdit(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_goods/edit',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function classifyAdd(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_cate/add',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function classifyEdit(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/store_cate/edit',
    method: 'post',
    data: qs.stringify(data)
  })
}
